/*    */ package com.zimbra.cs.session;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.account.NamedEntry;
/*    */ import com.zimbra.cs.account.NamedEntry.CheckRight;
/*    */ import com.zimbra.cs.account.SearchDirectoryOptions;
/*    */ import java.util.HashMap;
/*    */ import java.util.List;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class AdminSession
/*    */   extends Session
/*    */ {
/*    */   private static final long ADMIN_SESSION_TIMEOUT_MSEC = 600000L;
/*    */   private DirectorySearchParams mSearchParams;
/* 41 */   private HashMap<String, Object> mData = new HashMap();
/*    */   
/*    */   public AdminSession(String accountId) {
/* 44 */     super(accountId, Session.Type.ADMIN);
/*    */   }
/*    */   
/*    */   protected boolean isMailboxListener()
/*    */   {
/* 49 */     return false;
/*    */   }
/*    */   
/*    */   protected boolean isRegisteredInCache()
/*    */   {
/* 54 */     return true;
/*    */   }
/*    */   
/*    */   protected long getSessionIdleLifetime()
/*    */   {
/* 59 */     return 600000L;
/*    */   }
/*    */   
/* 62 */   public Object getData(String key) { return this.mData.get(key); }
/* 63 */   public void setData(String key, Object data) { this.mData.put(key, data); }
/* 64 */   public void clearData(String key) { this.mData.remove(key); }
/*    */   
/*    */ 
/*    */   public void notifyPendingChanges(PendingModifications pns, int changeId, Session source) {}
/*    */   
/*    */   protected void cleanup() {}
/*    */   
/*    */   public List<NamedEntry> searchDirectory(SearchDirectoryOptions searchOpts, int offset, NamedEntry.CheckRight rightChecker)
/*    */     throws ServiceException
/*    */   {
/* 74 */     DirectorySearchParams params = new DirectorySearchParams(searchOpts, rightChecker);
/*    */     
/* 76 */     boolean needToSearch = (offset == 0) || (this.mSearchParams == null) || (!this.mSearchParams.equals(params));
/*    */     
/* 78 */     if (needToSearch)
/*    */     {
/* 80 */       params.doSearch();
/* 81 */       this.mSearchParams = params;
/*    */     }
/*    */     
/*    */ 
/* 85 */     return this.mSearchParams.getResult();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/session/AdminSession.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */